From: Jasper St. Pierre Date: Thu, 14 Mar 2013 21:06:17 +0000 (-0400) Subject: background: Fix a bug with empty animations X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4462 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8edd7ad32e83698ac5703851947eecffd5b14c2d;p=gnome-shell.git background: Fix a bug with empty animations Arrays always evaluate to true, even empty arrays, so we need to check the length to make sure we have no files. https://bugzilla.gnome.org/show_bug.cgi?id=695882 --- diff --git a/js/ui/background.js b/js/ui/background.js index e86dd6e07..bfe06a526 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -387,7 +387,7 @@ const Background = new Lang.Class({ this._animation.update(this._layoutManager.monitors[this._monitorIndex]); let files = this._animation.keyFrameFiles; - if (!files) { + if (files.length == 0) { this._setLoaded(); this._queueUpdateAnimation(); return;